package sep.test;

import static com.googlecode.javacv.cpp.opencv_imgproc.CV_BGR2GRAY;
import static com.googlecode.javacv.cpp.opencv_imgproc.cvCvtColor;
import static com.googlecode.javacv.cpp.opencv_imgproc.cvSobel;

import com.googlecode.javacv.cpp.opencv_core.IplImage;

public class IdaSobelFilter implements IdaEdgeFilter {

	private static final long serialVersionUID = 8483923319726407672L;

	private int apertureSize = 3;
	private int xOrder = 1;
	private int yOrder = 0;

	@Override
	public void filter(IplImage original, IplImage edge) {
		cvCvtColor(original, edge, CV_BGR2GRAY);
		cvSobel(edge, edge, xOrder, yOrder, apertureSize);
	}

	@Override
	public EdgeFilterType getFilterType() {
		return EdgeFilterType.Sobel;
	}

}
